__all__ = [

          'int2', 'int2vector', 'int4', 'int8',
          'varchar', 'bool', 'datetime', 'date', 'text',
          'date', 'time'

          ]


int2 = 'int2'
int2vector = 'int2vector'
int4 = 'int4'
int8 = 'int8'
text = 'text'
def varchar( value=False ):
    if not value:
        return 'varchar'
    if not isinstance( value, int ):
        raise Exception( 'Attr error' )
    if value == 0:
        return 'varchar'
    else:
        return ['varchar', value]

bool = 'bool'

datetime = 'timestamp'
date = 'date'
time = 'time'
